Ext.define("admin.view.accessControl.deviceGroupChildrenTreeView", {
    extend: 'Ext.tree.Panel',
    singleton: false,
    alias: 'widget.accessControl.deviceGroupChildrenTreeView',
    border: true,
    rootVisible: false,
    listeners: {
        itemclick: function (t, record, item, index, e, eOpts) {
            alert(record.data.text);
        },
        checkchange: function (node, checked) {
            var leaf = node.get("leaf");
            var checked = node.get("checked")
            if(leaf){
                node.cascade(function (node) {
                    node.set('checked', checked);

                });
            }
        }
    }
});
